package com.agilegroup.crm.requests;

import static com.agilegroup.crm.utils.CONSTANTS.accountsUrl;

import com.agilegroup.crm.model.AccountList;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class AccountJsonRequest extends SpringAndroidSpiceRequest<AccountList>{

	private String empId;
	
	public AccountJsonRequest(String empId) {
		super(AccountList.class);
		this.empId=empId;
	}
	
	@Override
	public AccountList loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(accountsUrl+empId+".json", AccountList.class);
	}
}
